#define _CRT_SECURE_NO_WARNINGS 1
int FactorialSum(List L)
{
    int sum = 0;
    while (L != NULL)
    {
        int i = 0;
        int ret = 1;
        for (i = 1; i <= L->Data; i++)
        {
            ret *= i;
        }
        sum += ret;
        L = L->Next;
    }
    return sum;
}